package com.badlogic.androidgames.mypirates;

import com.badlogic.androidgames.framework.Graphics;

import android.graphics.Paint;
import android.graphics.Rect;

public class MenyEntry {
	Rect bounds;
	String text;
	Paint paint;
	public Rect position;
	
	public MenyEntry(String text, Paint paint, int x, int y) {
		this.text = text;
		this.paint = paint;
		bounds = new Rect();
		paint.getTextBounds(text, 0, text.length(), bounds);
		position = new Rect();
		position.set(x, y + bounds.bottom, bounds.right, y + bounds.bottom + bounds.height());
	}

	public void draw(Graphics g){
		g.drawText(text, position.left, position.top + bounds.height(), paint);
	}
}
